﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Data;
using System.ComponentModel.DataAnnotations;
using BCCommon.OAEnums;
using BCDto.OA.WorkflowTemplate.WorkflowTemplateStepLineConfig;

namespace BCDto.OA.WorkflowTemplate.WorkflowTemplateStep
{
	/// <summary>
	/// 工作流模板步骤
	/// </summary>
	public class WorkflowTemplateStepRequestDto
	{
		/// <summary>
		/// 步骤Code
		/// </summary>		
		[Display(Name = "步骤Code")]
		[Required(ErrorMessage = "{0} 不应为空")]
		[StringLength(50, MinimumLength = 2, ErrorMessage = "{0} 长度应大于{2} 且小于{1}")]
		public string Id { get; set; }
		/// <summary>
		/// 节点工具栏类型
		/// </summary>		
		[Display(Name = "节点工具栏类型")]
		[Required(ErrorMessage = "{0} 不应为空")]
		[StringLength(50, MinimumLength = 2, ErrorMessage = "{0} 长度应大于{2} 且小于{1}")]
		public string Type { get; set; }
		/// <summary>
		/// 步骤名称
		/// </summary>		
		[Display(Name = "步骤名称")]
		[Required(ErrorMessage = "{0} 不应为空")]
		[StringLength(50, MinimumLength = 2, ErrorMessage = "{0} 长度应大于{2} 且小于{1}")]
		public string NodeName { get; set; }
		/// <summary>
		/// 步骤类型(开始、结束、节点、会签、条件、子流程）
		/// </summary>		
		[Display(Name = "步骤类型(开始、结束、节点、会签、条件、子流程）")]
		[Required(ErrorMessage = "{0} 不应为空")]
		public OAStepNodeType NodeType { get; set; }
		/// <summary>
		/// 任务步骤
		/// </summary>		
		[Display(Name = "任务步骤")]
		[Required(ErrorMessage = "{0} 不应为空")]
		public int Step { get; set; }
		/// <summary>
		/// 步骤节点样式
		/// </summary>		
		[Display(Name = "步骤节点样式")]
		[Required(ErrorMessage = "{0} 不应为空")]
		public string Style { get; set; }
		/// <summary>
		/// 坐标
		/// </summary>		
		[Display(Name = "坐标")]
		[Required(ErrorMessage = "{0} 不应为空")]
		public List<double> Coordinate { get; set; }

		/// <summary>
		/// 步骤线配置
		/// </summary>		
		[Display(Name = "步骤线配置")]
		[Required(ErrorMessage = "{0} 不应为空")]
		public List<WorkflowTemplateStepLineConfigRequestDto> Lines { get; set; }
		/// <summary>
		/// 步骤节点配置列表
		/// </summary>		
		[Display(Name = "步骤节点配置列表")]
		[Required(ErrorMessage = "{0} 不应为空")]
		public List<object> FormConfig { get; set; }
	}
}

